﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ARA.Domain.Services
{
    public class AddService
    {
        public bool AddBatch(Entities.Batch batch)
        {
            using(ARADbContext dbContext = new ARADbContext())
            {
                dbContext.Set<Entities.Batch>().Add(batch);
                try
                {
                    dbContext.SaveChanges();
                    return true;
                }
                catch(Exception ex)
                {
                    return false;
                }
            }
        }
    }
}
